<template>
  <div class="detail-book-wrapper">
    <div class="detailbook-bookimg">
      <ImageView :src="book && book.cover"></ImageView>
    </div>
    <div class="detailbook-info">
      <div class="detailbook-info-title">{{(book && book.title) || ''}}</div>
      <div class="detailbook-info-author">{{(book && book.author) || ''}}</div>
      <div class="detailbook-info-info">{{(book && book.categoryText) || ''}}</div>
    </div>
  </div>
</template>

<script>
import ImageView from '../base/ImageView'
export default {
  components: { ImageView },
  props: {
    book: Object
  }
}
</script>

<style lang="scss" scoped>
// 页面整体左右边距
$margin-lr: 18px;
.detail-book-wrapper {
  margin: 20px $margin-lr 0 $margin-lr;
  display: flex;
  .detailbook-bookimg {
    width: 108px;
    flex: 3;
  }
  .detailbook-info {
    margin-left: 20px;
    flex: 7;
    .detailbook-info-title {
      font-size: 18px;
      line-height: 22px;
      max-height: 66px;
      font-weight: 500;
      overflow: hidden;
      color: #000;
      text-overflow: clip;
    }
    .detailbook-info-author {
      margin-top: 10px;
      font-size: 16px;
      line-height: 18px;
      max-height: 36px;
      overflow: hidden;
      color: #333;
      text-overflow: clip;
    }
    .detailbook-info-info {
      margin-top: 10px;
      font-size: 14px;
      line-height: 16px;
      max-height: 16px;
      overflow: hidden;
      color: #666;
      text-overflow: clip;
    }
  }
}
</style>